package com.llsydn.ui.component;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import com.llsydn.hello.R;
import com.llsydn.ui.component.alert.AlertComponentActivity;
import com.llsydn.ui.component.menu.MenuComponentActivity;
import com.llsydn.ui.component.progress.ProgressComponentActivity;
import com.llsydn.ui.component.simple.SimpleComponentActivity;

/**
 * @author lilinshen
 * @title ui组件component的activity
 * @description 请填写相关描述
 * @date 2018/9/20 10:14
 */
public class ComponentActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_component);

        findViewById(R.id.btn_component_1).setOnClickListener(this);
        findViewById(R.id.btn_component_2).setOnClickListener(this);
        findViewById(R.id.btn_component_3).setOnClickListener(this);
        findViewById(R.id.btn_component_4).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.btn_component_1:
                startActivity(new Intent(this, SimpleComponentActivity.class));
                break;
            case R.id.btn_component_2:
                startActivity(new Intent(this, MenuComponentActivity.class));
                break;
            case R.id.btn_component_3:
                startActivity(new Intent(this, ProgressComponentActivity.class));
                break;
            case R.id.btn_component_4:
                startActivity(new Intent(this, AlertComponentActivity.class));
                break;
            default:
                break;
        }
    }
}
